<?php
  /**
   * @author EVANDRO DE OLIVEIRA.
   * @category LAYOUT.
   * @since 12/02/2012.
   * @last_update 12/02/2012.
   * @copyright 2012.
   * @version 1.0.
   *
   */
?>
<?= $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?php echo Zend_Registry::getInstance()->config->system->admin->title?></title>
    <?php
    $this->headScript()->prependFile($this->baseUrl . '/media/admin/js/jquery/jquery-1.4.2.js');
    $this->headScript()->appendFile($this->baseUrl . '/media/admin/js/jquery/jquery.maskedinput.js');
    
    $browser = explode(';',$_SERVER['HTTP_USER_AGENT']);
    $browser = explode(' ',$browser[1]);
    
    if($browser[1]=='MSIE'){
      $this->headLink()->prependStylesheet($this->baseUrl . '/media/admin/css/ieAdmin.css');
      //$marginMenu = "class='div_5 td_85'";
      $marginMenu = "style='margin-left: 10px; margin-top:20px;'";
    }
    else{
      $this->headLink()->prependStylesheet($this->baseUrl . '/media/admin/css/geralAdmin.css');
      //$marginMenu = "class='div_5'";
      $marginMenu = "style='margin-left: 10px; margin-top:20px;'";
    }
    
    // Imprime as referencias aos arquivos CSS e Javascript
    echo $this->headLink();
    echo $this->headScript();
    ?>
    <script type="text/javascript">
      jQuery(function($){
        $("#dt_alteracao").mask("99/99/9999");
      });
    </script>
  </head>
  <body>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td style="background-image:url(<?=$this->baseUrl?>/media/admin/imagens/bg_top.gif); background-repeat:repeat-x;">
                <img src="<?=$this->baseUrl?>/media/admin/imagens/tit_seguranca.gif" alt="" width="597" height="55" border="0" />
                <p class="title">&nbsp;</p>
              </td>
            </tr>
          </table>
          <table width="100%" cellpadding="0" cellspacing="0" border="0">
            <tr valign="top">
              <td height="85" style="background: #f7f7f7 url(<?=$this->baseUrl?>/media/admin/imagens/bg_menu_top3.gif) repeat-x;">
                <div class="verdana10CinzaEscuro" <?=$marginMenu?> >
                  <?php                     
                    if(Zend_Auth::getInstance()->hasIdentity() && Zend_Auth::getInstance()->getIdentity()->st_member == 1 && intval(Zend_Auth::getInstance()->getIdentity()->idProfile) == 1 ){
                      $objDaoMembers = new Application_Model_Members();
                      
                      $objMembers = $objDaoMembers->find(Zend_Auth::getInstance()->getIdentity()->idMember)->current();
                      
                      if($objMembers->ds_password_temporary != md5(Zend_Registry::getInstance()->config->default->pass)){
                        echo $this->navigatorsAdmin(); 
                      }  
                    }
                  ?>
                </div>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td class="rodape" class="td_39">
          <table width="100%">
            <?php echo $this->layout()->content ?>
          </table>
        </td>
      </tr>
      <tr>
        <td class="rodape" class="td_39">
          <table width="100%" align="center">
            <tr>
              <td align="center">
                Copyright © LOCAT 2012 |
                Desenvolvimento: Thunder Solutions |
                Arte Gráfica: Vitrine Mágica</td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </body>
</html>  